home *** CD-ROM | disk | FTP | other *** search
/ Java for 3D & VRML Worlds / Java for 3d and VRML Worlds.iso / world / blur / blur.wrl < prev   
Text File  |  1996-10-17  |  2KB  |  82 lines

  1. #VRML V2.0 utf8
  2. #
  3. # "Simple Blur Effect" with one blur object
  4. #     created by ask@krc.sony.co.jp (Masamichi zzzcat Asukai)
  5. #
  6. # Copyright(C) 1996 Sony Corporation. All rights reserved.
  7. #
  8.  
  9. Viewpoint {
  10.     position 0.0 0.0 15.0
  11. }
  12.  
  13. Background {
  14.     skyColor 0.5 0.3 0.7
  15. }
  16.  
  17. DEF REALOBJ Transform {
  18.     translation -5.0 0.0 0.0
  19.     children[
  20.         Shape {
  21.             appearance Appearance {
  22.                 material Material {
  23.                     ambientIntensity 0.0
  24.                     diffuseColor 0.4 0.6 0.5
  25.                     emissiveColor 0.2 0.3 0.25
  26.                     transparency 0.0
  27.                 }
  28.             }
  29.             geometry Sphere{}
  30.                }
  31.     ]
  32. }
  33.  
  34. DEF TIME1 TimeSensor{
  35.     cycleInterval 5.0
  36.     stopTime -1
  37.     loop TRUE
  38. }
  39.  
  40. DEF POSINT PositionInterpolator{
  41.     set_fraction 0.5
  42.     key [0, 0.2, 0.3, 0.5, 0.7, 0.8, 1]
  43.     keyValue [-5 0 0, -3 0 0, 3 0 0, 5 0 0, 3 0 0, -3 0 0, -5 0 0]
  44. }
  45.  
  46. ROUTE TIME1.fraction_changed TO POSINT.set_fraction
  47. ROUTE POSINT.value_changed TO REALOBJ.set_translation
  48.  
  49.  
  50. DEF BLUROBJ Transform {
  51.     translation -5.0 0.0 0.0
  52.     children[
  53.         Shape {
  54.             appearance Appearance {
  55.                 material Material {
  56.                     ambientIntensity 0.0
  57.                     diffuseColor 0.4 0.6 0.5
  58.                     emissiveColor 0.2 0.3 0.25
  59.                     transparency 0.5
  60.                 }
  61.             }
  62.             geometry Sphere{}
  63.                }
  64.     ]
  65. }
  66.  
  67. DEF TIME2 TimeSensor{
  68.     cycleInterval 0.05
  69.     stopTime -1
  70.     loop TRUE
  71. }
  72.  
  73. DEF SCRIPT Script {
  74.     url "blur.class"
  75.     eventIn SFTime interval
  76.     eventOut SFVec3f setTranslation
  77.     field SFNode realobj USE REALOBJ
  78.  
  79. ROUTE TIME2.cycleTime TO SCRIPT.interval
  80. ROUTE SCRIPT.setTranslation TO BLUROBJ.set_translation
  81.